const baseUrl = "/social";
import { apiClient, ApiListResponse } from "../lib/api";

export interface GetParams {
  pageSize: number;
  pageNum: number;
}

export const getSocialList = async (
  data: GetParams
): Promise<ApiListResponse<any>> => {
  return await apiClient.getList<any>(`${baseUrl}/list`, { params: data });
};

export const syncFlow = async (url: string, channel: string, type: string) => {
  return await apiClient.post(`${baseUrl}/sync-flow`, { url, channel, type });
};
